package com.runvp.common.util.enc.aes128gcm;

import java.math.BigInteger;

public class HexToBinaryArray {
    public static void main(String[] args) {
        hex2BinArr("1A3F");
    }

    public static byte[] hex2BinArr(String hexString) {
        BigInteger bigInteger = new BigInteger(hexString, 16); // 将16进制字符串转换为BigInteger
        byte[] binaryArray = bigInteger.toByteArray(); // 将BigInteger转换为二进制数组
        return binaryArray;
    }
}